﻿using Island;

public class Account
{
    public string id;
    public int sex;

    /// <summary>
    /// PBAccount转为Account
    /// </summary>
    public static Account FromPB(PBAccount pb)
    {
        Account acc = new Account();
        acc.id = pb.id;
        acc.sex = pb.sex;

        return acc;
    }

    /// <summary>
    /// Account转为PBAccount
    /// </summary>
    public PBAccount ToPB()
    {
        PBAccount pb = new PBAccount();
        pb.id = this.id;
        pb.sex = this.sex;

        return pb;
    }
}